<?php
	include_once("login.php");

	$conn = new mysqli($host,$user,$passwd, $database)
	or die("SQL connect error: ".mysqli_connect_error());
	
	$contactId = $_REQUEST["ContactId"];
	$name = $_REQUEST["name"];
	$address = $_REQUEST["address"];
	$phone = $_REQUEST["phone"];
	$altPhone = $_REQUEST["altPhone"];
	$email = $_REQUEST["email"];
	$comment = $_REQUEST["comment"];
	$categoryId = $_REQUEST["categoryId"];
	$userId = $_REQUEST["userId"];
	
	$query = "INSERT INTO contact (ContactId, name, address, phone, altPhone, email, comment, userId, categoryId) VALUES ('$contactId', '$name', '$address', '$phone', '$altPhone', '$email', '$comment', $userId, $categoryId)";
	print $query;
	mysqli_query($conn, $query);
	
	mysqli_close($conn);
?>